package com.sunday.common.core.enums;

import lombok.AllArgsConstructor;

/**
 * 运营商枚举类
 *
 * @author zsy
 * @since 2022/10/13
 */
@AllArgsConstructor
public enum OperatorTypeEnum {

    CHINA_UNICOM(1),//中国联通
    CHINA_MOBILE(2),//中国移动;
    CHINA_TELECOM(3);//中国电信

    private static final OperatorTypeEnum[] VALUES = new OperatorTypeEnum[values().length];

    static {
        for (final OperatorTypeEnum cur : values()) {
            VALUES[cur.value - 1] = cur;
        }
    }

    public int value;

    public static OperatorTypeEnum findByValue(final int value) {
        return VALUES[value - 1];
    }

}
